<template>
  <div class="goodscard">
    <van-count-down :time="time" class="countdown" />
     <van-swipe class="goods-image" indicator-color="#ff5733">
                <van-swipe-item v-for="imgs in goodsImg" :key="imgs">
                    <img :src="imgs" >
                </van-swipe-item>
    </van-swipe>
    <!-- 商品信息列表 -->
    <div class="info" v-for="(info,index) in Infos" :key="index">
      <!-- <img :src="info&&'../../../static/img/'+info.img" class="goods-image" /> -->
      <p class="describe">{{info&&info.describe}}</p>
      <div class="price">
        <p class="nowprice">
          ￥{{info&&info.nowPrice}}
          <s class="beforeprice">￥{{info&&info.beforePrice}}</s>
        </p>
      </div>
      <p class="rest">
        仅剩:
        <span>{{info.rest}}件</span>
      </p>
    </div>
    <van-divider />
  </div>
</template>

<script>
export default {
  name: "goodsCard",
  data() {
    return {
      goodsImg:[
          '../../../static/img/goodsdemo2.jpg',
          '../../../static/img/goodsdemo3.jpg',
          '../../../static/img/goodsdemo4.jpg',
      ],
      Infos: [
        {
          img: "homeSecKillGood1.jpg",
          describe: "NB ML373MTA 白",
          nowPrice: "369",
          beforePrice: "496",
          rest: "12"
        },
      ],
      time:
        Date.parse(
          new Date().getFullYear() +
            "-" +
            (new Date().getMonth() + 1) +
            "-" +
            new Date().getDate() +
            " " +
            23 +
            ":00:00"
        ) - Date.now()
    };
    methods: {
    }
  }
};
</script>


<style scoped >
.goodscard {
  overflow: hidden;
  text-align: center;
  position: relative;
}
.rest {
  text-align: right;
  margin-right: 0.266667rem;
  margin-bottom: 0.266667rem;
}
.rest span {
  color: #ff5733;
  display: inline-block;
  padding-left: 0.08rem;
}
.countdown {
  display:block;
  z-index:1;
  color: #ff5733;
  line-height: 1.066667rem;
  position: absolute;
  top: 1.266667rem;
  left: 4rem;
  font-size: 0.533333rem;
  font-weight: bold;
}
.goodscard img {
  width: 90%;
}
.describe {
  font-weight: bold;
  font-size: 0.48rem;
  padding-bottom: 0.4rem;
}
.nowprice {
  color: #ff5733;
  font-size: 0.666667rem;
  text-align: center;
  font-weight: bold;
}
.beforeprice {
  color: #b4b4b4;
  font-size: 0.4rem;
  padding-left: 0.133333rem;
}
.dropdown {
  width: 30%;
}
.selected {
  padding-top: 0.3933333rem;
  padding-bottom: 0.103333rem;
}
.selected strong {
  margin-left: 0.4rem;
  font-size: 0.48rem;
}
.select {
  display: inline;
  color: #b4b4b4;
}
</style>